import {Module} from 'vuex';
import { KeepAliveNamesState,RootStateTypes } from '/@/store/interface/index';

const keepAliveNamesModule:Module<KeepAliveNamesState,RootStateTypes> ={
    namespaced:true,
    state:{
        keepAliveNames:[]
    },
    mutations:{
        getCacheKeepAlive(state:any,data:Array<string>){
            state.keepAliveNames = data
        }
    },
    actions:{
      async  setCacheKeepAlive({commit}, data: Array<string>){
          commit('getCacheKeepAlive',data)
        }
    }
}
export default keepAliveNamesModule;